#ifndef _BUOLA_NET_CXMLRPCCALL_H_
#define _BUOLA_NET_CXMLRPCCALL_H_

#include <buola/xml.h>
#include <buola/net/cxmlrpcarray.h>
#include <buola/net/cxmlrpcstruct.h>

namespace buola { namespace io {

class CXMLRPCCall
{
public:
    CXMLRPCCall(const std::string &pMethod);
    
    void AddParam(int pValue);
    void AddParam(bool pValue);
    void AddParam(const char *pValue)   {   AddParam(std::string(pValue));  }
    void AddParam(const std::string &pValue);
    void AddParam(double pValue);
    void AddParam(const CXMLRPCArray &pArray);
    
    const xml::CDoc &XML() const    {   return mXML;    }
    xml::CDoc &XML()                {   return mXML;    }

private:
    void AddParam(const std::string &pType,const std::string &pValue);
    
private:
    xml::CDoc mXML;
    xml::CNode mParams;
};

/*namespace io*/ } /*namespace buola*/ }

#endif
